package ru.ssau.berlin.framework.validate;


public class RegExpValidator implements TypeValidator {

    private String pattern;

    public RegExpValidator(String pattern) {
        this.pattern = pattern;
    }

    public boolean isValid(String value) {
        return pattern.matches(pattern);
    }
}
